﻿/***********************************************************************
 * <copyright file="MultipleComboTreeExtension.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   LinhMC
 * Email:    linhmc@buca.vn
 * Website:
 * Create Date: Friday, November 15, 2013
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/
using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace EasyUIMvc.ComboBox
{
    public class MultipleComboTreeExtension : ExtensionBase
    {
        private readonly MultipleComboTreeSettings _settings;

        public MultipleComboTreeExtension(MultipleComboTreeSettings settings)
        {
            _settings = settings;
        }

        public override string GetScripts()
        {
            throw new NotImplementedException();
        }

        public override MvcHtmlString GetHtml()
        {
            var combobox = GetTopTag("select", "easyui-combotree", _settings);
            combobox.MergeAttribute("multiple style", _settings.Style);
            return MvcHtmlString.Create(combobox.ToString());
        }
    }
    public class MultipleComboTreeSettings : SettingsBase
    {
        public string Style { get; set; }
    }
}
